<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>父子组件-动态传递数据</title>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.js"></script>
</head>
<body>
<div id="case13-demo6">
    我是内容呀:<input type="text" v-model="parentmsg">
    <bind-component v-bind:msg="parentmsg"></bind-component>
</div>
<script type="text/javascript">
    var case13Demo6=new Vue({
        el:"#case13-demo6",
        data:{
            parentmsg:"今天天气很好"
        },
        components:{
            'bind-component':{
                props:['msg'],
                template:'<div>{{msg}}</div>'
            }
        }
    })
</script>
</body>
</html>